package com.qf.flash.ui.circle;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.qf.flash.R;
import com.qf.flash.model.MyLaunchBean;
import com.qf.flash.ui.home.adapter.BalanceDetailsItem;
import com.qf.flash.ui.home.adapter.CircleRecommendItem;
import com.qf.flashlib.adapter.RVAdapter;
import com.qf.flashlib.base.BaseActivity;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class StrategyActivity extends BaseActivity {
    @BindView(R.id.tv_top_back)
    TextView tvTopBack;
    @BindView(R.id.tv_top_title)
    TextView tvTopTitle;
    @BindView(R.id.rv_frame)
    RecyclerView mRecyclerView;
    private RVAdapter<Object> mAdapter;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_choose_frame;
    }

    @Override
    protected void initViewAndData() {
        tvTopTitle.setText("剧本杀攻略");


        //   -------------------
        mAdapter = new RVAdapter<>(new CircleRecommendItem(this));
        mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
        mRecyclerView.setAdapter(mAdapter);
        List<Object> datas = mAdapter.getDatas();
        for (int i = 0; i < 5; i++) {
            datas.add(new MyLaunchBean());
        }
        mAdapter.setDatas(datas);
    }

    public static void start(Activity activity) {
        Intent intent = new Intent(activity, StrategyActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
    }

    @OnClick(R.id.tv_top_back)
    public void onViewClicked() {
        finish();
    }
}
